class User:
    def __init__(self, username, password, pass_salt):
        self.username = username
        self.password = password
        self.pass_salt = pass_salt
        self.balance = 10000.0
        self.flow = []
        self.is_locked = False
        self.is_admin = True

    def obj2dict(self):
        user_dict = {
            'username': self.username,
            'password': self.password,
            'pass_salt': self.pass_salt,
            'balance': self.balance,
            'flow': self.flow,
            'is_locked': self.is_locked,
            'is_admin': self.is_admin
        }
        return user_dict

    @classmethod
    def dict2obj(cls, user_dict):
        obj = cls(user_dict['username'], user_dict['password'], user_dict['pass_salt'])
        obj.balance = user_dict['balance']
        obj.flow = user_dict['flow']
        obj.is_locked = user_dict['is_locked']
        obj.is_admin = user_dict['is_admin']
        return obj

